#include <iostream>
#include <memory>	//std::unique_ptr

#include "cl_programs/ocl_prog.h"
#include "cl_programs/euclidean.h"
#include "cl_programs/pearson.h"


int main(int argc, char* argv[])
{
//	cl_program *computeWhat;
	std::unique_ptr<ocl_prog> computeWhat;	// try out the new std::unique_ptr

	//flags : -e for euclidean and -p for pearson
	std::string option = argv[1];
	if( option == "-e")
	{
//		computeWhat = new euclidean();
		computeWhat.reset(new euclidean());
	}
	else if(option == "-p")
	{
//		computeWhat = new pearson();
		computeWhat.reset(new pearson());
	}
	else
	{
		std::cout<<"Invalid arguments\n"
			<<"Usage: -[option] [input path] [output path]\n" ;
		exit(0);
	}

	computeWhat->init(argv[2], argv[3]);
	computeWhat->run();
	computeWhat->end();

//	delete computeWhat;
	return 0;
}